<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

	if ( ! function_exists('box_newbox'))
	{
	/*
	$boxid 	: boxID
	$boxw	: box的宽
	$boxt	：box的标题
	$boxcon	: box的内容
	$boxtop	: box距顶的高度
	$s		: 关闭   0 关闭层  1关闭页面
	样式表位置：/css/ms/theme/default.css   newbox 
	*/
		function box_newbox($boxid,$boxt='',$boxcon='',$boxtop='200px',$boxw='450px',$s=0){
			$s==0? $onclick = "boxoff('$boxid')" : $onclick = "cwin()" ;
			$index_guanbi = '关闭';
			if ($boxt == '') $display = 'style="display:none"'; else $display ='';
			$newdiv = <<<NEWDIV
			<div id="$boxid" class="newbox" style="width:$boxw;top:$boxtop;">
				<div class="newboxtitle" $display>
					<a href="javascript:;" class="closebtn" onClick="$onclick" title="$index_guanbi">×</a>$boxt
				</div>
				<div class="newboxbody">$boxcon</div>
			</div>
NEWDIV;
			echo $newdiv;
		}
	
	}


	if ( ! function_exists('box_popbox'))
	{
		function box_popbox($id,$t,$c)
		{
			echo <<<ALT
			<div id="$id" style="">
				<div class="popup">
					<div class="popup-header">
						<h2>$t</h2>
						<a href="javascript:;" onclick="$.closePopupLayer('$id')" title="Close" class="close-link">Close</a>
						<br clear="all" />
					</div>
					<div class="popup-body">
			$c 
					</div>
				</div>
			</div>
ALT;
		}
	
	
	
	}
















